package cn.com.cdb.ldms.ftz.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 部门
 * </p>
 *
 * @author liukui
 * @since 2025-06-26
 */
@Getter
@Setter
@ToString
@TableName("SYS_DEPT")
@Schema(name = "Dept", description = "部门")
@KeySequence(value = "SEQ_PUBLIC")
public class Dept implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Schema(description = "ID")
    @TableId(value = "DEPT_ID", type = IdType.INPUT)
    private BigDecimal deptId;

    /**
     * 上级部门
     */
    @TableField("PID")
    @Schema(description = "上级部门")
    private BigDecimal pid;

    /**
     * 子部门数目
     */
    @TableField("SUB_COUNT")
    @Schema(description = "子部门数目")
    private Long subCount;

    /**
     * 名称
     */
    @TableField("NAME")
    @Schema(description = "名称")
    private String name;

    /**
     * 排序
     */
    @TableField("DEPT_SORT")
    @Schema(description = "排序")
    private Long deptSort;

    /**
     * 状态
     */
    @TableField("ENABLED")
    @Schema(description = "状态")
    private String enabled;

    /**
     * 创建者
     */
    @TableField("CREATE_BY")
    @Schema(description = "创建者")
    private String createBy;

    /**
     * 更新者
     */
    @TableField("UPDATE_BY")
    @Schema(description = "更新者")
    private String updateBy;

    /**
     * 创建日期
     */
    @Schema(description = "创建日期")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("UPDATE_TIME")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}
